import request from '@/utils/request'

// 查询邮件任务列表
export function listEmailTask(query) {
  return request({
    url: '/email/bulkTask/list',
    method: 'get',
    params: query
  })
}

// 查询邮件任务详细
export function getEmailTask(taskId) {
  return request({
    url: '/email/bulkTask/' + taskId,
    method: 'get'
  })
}

// 新增邮件任务
export function addEmailTask(data) {
  return request({
    url: '/email/bulkTask',
    method: 'post',
    data: data
  })
}

// 修改邮件任务
export function updateEmailTask(data) {
  return request({
    url: '/email/bulkTask',
    method: 'put',
    data: data
  })
}

// 删除邮件任务
export function delEmailTask(taskId) {
  return request({
    url: '/email/bulkTask/' + taskId,
    method: 'delete'
  })
}


export function listTaskRecipient(query) {
  return request({
    url: '/email/bulkTask/taskRecipientList',
    method: 'get',
    params: query
  })
}
